<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/vue-2.6.10.js"></script>
</head>
<body>
<div id="app">
    <counter></counter>
    <counter></counter>
    <counter></counter>

</div>
<script type="text/javascript">
    const counter = {
        template:"<button @click='num++'>点了{{num}}</button>",
        data(){
            return {num:0}
        }
    };

    var app = new Vue({
        el: "#app",
        components: {
            counter: counter
        },
    });
</script>
</body>
</html>